package com.topisv.tms.service.stock.instorage;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.topisv.tms.entity.log.OrderLog;
import com.topisv.tms.entity.stock.instorage.InstorageLog;
import com.topisv.tms.repository.stock.instorage.InstorageLogDao;

/**
 * 入库日志
 * @author ch
 *
 */
@Component
@Transactional(readOnly = true)
public class InstorageLogService {
	@Autowired
	private InstorageLogDao instorageLogDao;

	/**
	 * 保存日志
	 * @param log
	 */
	@Transactional(readOnly = false)
	public void saveLog(InstorageLog log) {
		this.instorageLogDao.save(log);
	}
	
	/**
	 * 查询日志
	 * @param billCode 订单编号
	 * @return
	 */
	public List<InstorageLog> loadLogByBillCode(String billCode) {
		return this.instorageLogDao.loadLogByBillCode(billCode);
	}
}
